#ifndef _PACKETS_H
#define _PACKETS_H

// EAPOL Frame type
#define EAPOL_FRAME           0x888e

#define GROUPADDR_8021X		{0x01,0x80,0xC2,0x00,0x00,0x03}

#define EAPOL_EAPPACKET	0
#define EAPOL_START		1
#define EAPOL_LOGOFF	2


#define EAP_REQUEST  1
#define EAP_RESPONSE 2
#define EAP_SUCCESS	 3
#define EAP_FAILURE	 4

#define EAPTYPE_IDENTITY 1
#define EAPTYPE_MD5CHALLENGE 4

typedef struct frame{
	unsigned char 	dstMAC[6];
	unsigned char 	srcMAC[6];
	unsigned short 	type;
	unsigned char 	data[0];
}frame_t;

typedef struct eapol {
  unsigned char  version;
  unsigned char  type;
  unsigned short dataLength;
  unsigned char	 data[0];
}eapol_t;

typedef struct eap{
  unsigned char  code;
  unsigned char  identifier;
  unsigned short eapLength;
  unsigned char  data[0];
}eap_t;



#endif
